package com.k.demo.websocket;

import javax.websocket.HandshakeResponse;
import javax.websocket.server.HandshakeRequest;
import javax.websocket.server.ServerEndpointConfig;
import javax.websocket.server.ServerEndpointConfig.Configurator;

public class MyWSConfig extends Configurator{

	@Override
	public void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response) {

		sec.getUserProperties().put("clientKey", request.getHeaders().get(request.SEC_WEBSOCKET_KEY).get(0));
		
	}

	
	
}
